package com.conpany.project.service;

import com.company.project.dao.TradeMqConsumerLogMapper;
import com.company.project.model.TradeMqConsumerLog;
import com.conpany.project.Tester;
import org.junit.Test;

import javax.annotation.Resource;

public class logService extends Tester {

    @Resource
    private TradeMqConsumerLogMapper tradeMqConsumerLogMapper;
    @Test
    public void query(){

//        TradeMqConsumerLogKey key = new TradeMqConsumerLogKey();
//        // 联合主键groupName以及tag，
//        key.setGroupName(groupName);
//        key.setMsgKey(keys);
//        key.setMsgTag(tags);
//        // 从MQ，消费日志表
//			mqConsumerLog = this.tradeMqConsumerLogMapper.selectByPrimaryKey(key);

        TradeMqConsumerLog queryConsumerLog = new TradeMqConsumerLog();
        queryConsumerLog.setMsgKeys("key1");
        queryConsumerLog.setGroupName("name1");
        queryConsumerLog.setMsgTag("tag1");
        // 从MQ，消费日志表 用联合主键groupName,msgKey以及tag 查找
        TradeMqConsumerLog  mqConsumerLog = this.tradeMqConsumerLogMapper.selectByPrimaryKey(queryConsumerLog);
        System.out.println(mqConsumerLog);

    }

}
